<?php
@require_once("config.php");
$con = $_GET["con"];
$orderType = $_GET["orderType"];
$type = $_GET["order"];
$pageIndex = $_GET["pageindex"]; 
$showNum = $_GET["showNum"];
$skipNum = $pageIndex*$showNum;
$sql = "select * from goodlist where goods_title like '%$con%' order by $orderType $type limit $skipNum,$showNum ";
$result = mysql_query($sql);
$all = array();
while($item = mysql_fetch_assoc($result)){
    $all[]=$item;
}
echo json_encode($all);
?>